﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MSTestContrib.Specifications;
using System.Xml;
using GoGrid.Specifications.Properties;

namespace GoGrid.Specifications
{
    public class GoGridSpecificationBase : Specification
    {
        protected XmlNode LoadXmlFragment(SpecificationContext specificationContext, string fragmentFileName)
        {
            var document = new XmlDocument();
            document.Load(fragmentFileName);
            return document.DocumentElement;
        }

        protected Connection GetConnection()
        {
            var connection = new Connection(Settings.Default.GoGridApikey, Settings.Default.GoGridSecret);
            return connection;
        }
    }
}
